import request from '@/utils/request'

// 合同分页列表
export function addPaymentRecord(contractId, money, paymentTime) {
  return request({
    url: `/contract/payment/${contractId}/${money}/${paymentTime}`,
    method: 'POST'
  })
}
// 新增合同
export function listPaymentRecord(contractId) {
  return request({
    url: `/contract/payment/${contractId}`,
    method: 'GET'
  })
}
// 修改合同
export function updatePaymentRecord(id, money) {
  return request({
    url: `/contract/payment/${id}/${money}`,
    method: 'PUT'
  })
}
// 删除合同
export function delPaymentRecord(id) {
  return request({
    url: `/contract/payment/${id}`,
    method: 'DELETE'
  })
}
// 修改回款记录
export function editPayment(id, money, paymentTime) {
  return request({
    url: `/contract/payment/${id}/${money}/${paymentTime}`,
    method: 'PUT'
  })
}

